import re
s = "我sdlv;kasdlkf是老张;你asdlkfjaslkdfjasldkjf是老李"
rex = r'(\w*).(\w*).(\w*)'

#group表示匹配的完整字符
print(re.search(rex,s).group())
#groups是进行了分组匹配
print(re.search(rex,s).groups())
